<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Netkk.Common.Models.Message>" %>

<%@ Import Namespace="Netkk.Library" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>E-Mail senden - .NET-Stammtisch Konstanz-Kreuzlingen</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>E-Mail senden</h1>
    <p>
        <%= Html.Encode(ViewData["Message"]) %></p>
    <%= Html.ValidationSummary() %>
    <%using (Html.BeginForm("Contact", "Member", new RouteValueDictionary
                                           {
                                               {"controller", "Member"},
                                               {"action", "Contact"},
                                               {"id", Model.Id}
                                           },
                                           FormMethod.Post,
                                           new
                                           {
                                               enctype = "multipart/form-data"
                                           }))
      { %>
    <dl class="forms">
        <dt>Nachricht an:</dt>
        <dd>
            <strong>
                <%if (!String.IsNullOrEmpty(Model.ToUser.FirstName) || !String.IsNullOrEmpty(Model.ToUser.LastName))
                  { %>
                <%= Model.ToUser.FirstName%>
                <%= Model.ToUser.LastName%>
                <%}
                  else
                  {%>
                <%= Model.ToUser.Name%>
                <%} %>
            </strong>
        </dd>
        <dt>
            <label for="Subject">
                Betreff:</label></dt>
        <dd>
            <%=Html.TextBox("Subject", Model.Subject, new Dictionary<string, object> { { "class", "withhint" }, { "title", "Geben Sie hier Ihren Betreff ein.\nDiese Angabe ist nicht optional." } })%>
            <%=Html.ValidationMessage("Subject", "*")%>
        </dd>
        <dt class="ta">
            <label for="Text">
                Ihre Nachricht:</label></dt>
        <dd class="ta">
            <%=Html.TextArea("Text", Model.Text, new Dictionary<string, object> { { "class", "withhint" }, { "title", "Geben Sie hier eine Nachrictentext.\nDiese Angabe ist nicht optional." } })%>
            <%=Html.ValidationMessage("Text", "*")%>
        </dd>
        <dt></dt>
        <dd>
            <input type="submit" value="Versenden" /></dd>
    </dl>
    <% }%>
    <p>
        <%=Html.ActionLink("Abbrechen", "Index") %>
    </p>
</asp:Content>
